import math

class Solution(object):
    def isPerfectSquare(self, num):
        """
        :type num: int
        :rtype: bool
        """
        sqrt = math.sqrt(num)
        return int(sqrt) == sqrt

s = Solution()
print(s.isPerfectSquare(16))
